package types

import (
	_ "database/sql"
	"fmt"
	"time"
)
type TimeType time.Time

const (
	timeFormat = "2006-01-02 15:04:05"
)

func (t TimeType) MarshalJSON() ([]byte, error) {
	var stamp = fmt.Sprintf("\"%s\"", time.Time(t).Format(timeFormat))
	return []byte(stamp), nil
}

func (t TimeType) String() string {
	return time.Time(t).Format(timeFormat)
}
